<?php
$this->pageTitle = Yii::app()->name . ' - Contact Us';
?>
<h1>Contact Us</h1>
<div style="font-size: 15px;">
    <?php if (Yii::app()->user->hasFlash('contact')): ?>

        <div class="flash-success">
            <?php echo Yii::app()->user->getFlash('contact'); ?>
        </div>
    <?php else: ?>
        <ul class="address">
            <li><label style="font-weight: bold">Company Name: </label><span><a href="www.viewinvesta.com">www.viewinvesta.com</a>, sister concarn of <a target="_blank" href="http://www.carillion.ca/">Carillion</a></span></li>
            <li><label style="font-weight: bold">Address: </label><span>Carillion Canada Head Office<br> 7077 Keele Street<br> Concord, Ontario<br> Canada, L4K 0B6 </span></li>
            <li><label style="font-weight: bold">Phone: </label><span>+14035217929</span></li>
            <li><label style="font-weight: bold">E-mail: </label><span>contact@viewinvesta.com</span></li>
        </ul>
        <p style="text-align: justify">
            Prior to submitting your support request, we kindly ask you to carefully look through our <?php echo CHtml::link('Frequently Asked Question', array('/site/page', 'view' => 'faq')); ?> (<strong>FAQ</strong>) section of the website to find out if your inquiry may have been already addressed. </p>
        <p style="text-align: justify">
            In case if your question was not covered in our <strong>FAQ</strong> section, please use the form below to submit your support ticket. Depending on the current workload of our support department you can expect to receive the reply within 24 hours.</p>
        <p style="color: red">
            Please do NOT create multiple tickets, even if you are inquiring about different issues.
        </p>
        <h3 style="border-bottom: 1px solid #ddd; padding: 10px 0">Ticket System</h3>
        <div class="form">
            <?php
            $form = $this->beginWidget('CActiveForm', array(
                'id' => 'contact-form',
                'enableClientValidation' => true,
                'clientOptions' => array(
                    'validateOnSubmit' => true,
                ),
                    ));
            ?>
            <?php echo $form->errorSummary($model); ?>
            <div class="row">
                <?php echo $form->labelEx($model, 'name'); ?>
                <?php echo $form->textField($model, 'name'); ?>
                <?php echo $form->error($model, 'name'); ?>
            </div>

            <div class="row">
                <?php echo $form->labelEx($model, 'username'); ?>
                <?php echo $form->textField($model, 'username'); ?>
                <?php echo $form->error($model, 'username'); ?>
            </div>

            <div class="row">
                <?php echo $form->labelEx($model, 'email'); ?>
                <?php echo $form->textField($model, 'email'); ?>
                <?php echo $form->error($model, 'email'); ?>
            </div>

            <div class="row">
                <?php echo $form->labelEx($model, 'subject'); ?>
                <?php echo $form->textField($model, 'subject', array('size' => 60, 'maxlength' => 128)); ?>
                <?php echo $form->error($model, 'subject'); ?>
            </div>

            <div class="row">
                <?php echo $form->labelEx($model, 'body'); ?>
                <?php echo $form->textArea($model, 'body', array('rows' => 6, 'cols' => 50)); ?>
                <?php echo $form->error($model, 'body'); ?>
            </div>

            <?php if (CCaptcha::checkRequirements()): ?>
                <div class="row captcha">
                    <?php echo $form->labelEx($model, 'verifyCode'); ?>
                    <div>
                        <?php $this->widget('CCaptcha'); ?>
                        <?php echo $form->textField($model, 'verifyCode'); ?>
                    </div>
                    <div class="hint">Please enter the letters as they are shown in the image above.
                        <br/>Letters are not case-sensitive.</div>
                    <?php echo $form->error($model, 'verifyCode'); ?>
                </div>
            <?php endif; ?>
            <p class="note"><span class="required">*</span> (Asterisk) denotes required fields which therefore must not be left empty.</p>
            <div class="row buttons">
                <?php echo CHtml::submitButton('Submit Ticket'); ?>
            </div>
            <?php $this->endWidget(); ?>
        </div>
    <?php endif; ?>
</div>